home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Communications / General / Avtek ARA Scripts V1.1 / Avtek Pocket V32bis CD980 < prev   
Text File  |  1994-04-06  |  4KB  |  239 lines

  1.  
  2. !"Avtek PocketFax V32bis CD980 - 6th April 1994 - NJS - v1.1
  3. !
  4. ! Please note that you will need a Macintosh Hardware Handshake cable to
  5. ! use any modem with AppleTalk Remote Access at anything over 9600bps.
  6. !
  7. @ORIGINATE
  8. @ANSWER
  9. !
  10. @LABEL 1
  11. serreset 19200, 0, 8, 1
  12. !
  13. ! first sync up the modem
  14. !
  15. matchclr
  16. matchstr 1 3 "A"
  17. settries 0
  18. @LABEL 2
  19. write "A"
  20. matchread 10
  21. inctries
  22. iftries 4 3
  23. jump 2
  24. @LABEL 3
  25. matchclr
  26. settries 0
  27. matchstr 1 4 "OK\13\10"
  28. write "T\13"
  29. matchread 30
  30. !
  31. !    Now, recall the modems factory configuration
  32. !
  33. @LABEL 4
  34. matchstr 1 5 "OK\13\10"
  35. write "AT&F\13"
  36. matchread 30
  37. inctries
  38. iftries 2 59
  39. ! Modem is not responding, reset
  40. DTRClear
  41. pause 5
  42. DTRSet
  43. jump 4
  44. !
  45. ! Next, Set up the configuration:
  46. ! Echo off, turn off auto answer
  47. ! Ignore DTR (needed when using a Farallon remote wakeup cable)
  48. !
  49. @LABEL 5
  50. matchstr 1 6 "OK\13\10"
  51. write "ATE0&D0S0=0\13"
  52. matchread 30
  53. jump 59
  54. !
  55. ! Connect in Constant speed mode, no mnp, Hardware flow control 
  56. !
  57. @LABEL 6
  58. matchstr 1 7 "OK\13\10"
  59. write "AT\\N0&D0&K3%C0X3\13"
  60. matchread 30
  61. jump 59
  62. !
  63. ! Set up the speaker: If speaker flag is "1", jump to 8;  else turn off speaker
  64. @LABEL 7
  65. ifstr 2 8 "1"
  66. matchstr 1 8 "OK\13\10"
  67. write "ATM0\13"
  68. matchread 30
  69. jump 59
  70. !
  71. ! The modem is ready.  So enable answering, or originate a call
  72. !
  73. @LABEL 8
  74. ifANSWER 30
  75. ! Dial with V32bis enabled
  76. note "Dialing ^1" 3
  77. write "ATS0=0B15DT^1\13"
  78. !
  79. @LABEL 9
  80. matchstr 1 11 "CONNECT 1200\13\10"
  81. matchstr 2 12 "CONNECT 2400\13\10"
  82. matchstr 3 13 "CONNECT 4800\13\10"
  83. matchstr 4 14 "CONNECT 7200\13\10"
  84. matchstr 5 15 "CONNECT 9600\13\10"
  85. matchstr 6 16 "CONNECT 12000\13\10"
  86. matchstr 7 17 "CONNECT 14400\13\10"
  87. matchstr 8 50 "NO CARRIER\13\10"
  88. matchstr 9 50 "ERROR\13\10"
  89. matchstr 10 52 "NO DIALTONE\13\10"
  90. matchstr 11 53 "BUSY\13\10"
  91. matchstr 12 54 "NO ANSWER\13\10"
  92. matchread 700
  93. jump 59
  94. !
  95. @LABEL 11
  96. note "Modem connection established at 1200 bps." 2
  97. CommunicatingAt 1200
  98. jump 20
  99. !
  100. @LABEL 12
  101. note "Modem connection established at 2400 bps." 2
  102. CommunicatingAt 2400
  103. jump 20
  104. !
  105. @LABEL 13
  106. note "Modem connection established at 4800 bps." 2
  107. CommunicatingAt 4800
  108. jump 20
  109. !
  110. @LABEL 14
  111. note "Modem connection established at 7200 bps." 2
  112. CommunicatingAt 7200
  113. jump 20
  114. !
  115. @LABEL 15
  116. note "Modem connection established at 9600 bps." 2
  117. CommunicatingAt 9600
  118. jump 20
  119. !
  120. @LABEL 16
  121. note "Modem connection established at 12000 bps." 2
  122. CommunicatingAt 12000
  123. jump 20
  124. !
  125. @LABEL 17
  126. note "Modem connection established at 14400 bps." 2
  127. CommunicatingAt 14400
  128. jump 20
  129. !
  130. @LABEL 20
  131. HSReset 0 1 0 0 0 1
  132. ifANSWER 21
  133. pause 30
  134. @LABEL 21
  135. exit 0
  136. !
  137. !
  138. @LABEL 30
  139. write "ATS0=2B0\13"
  140. matchstr 1 31 "OK\13\10"
  141. matchread 30
  142. jump 59
  143. !
  144. @LABEL 31
  145. matchstr 1  32 "RING\13\10"
  146. matchstr 2  11 "CONNECT 1200\13\10"
  147. matchstr 3  12 "CONNECT 2400\13\10"
  148. matchstr 4  13 "CONNECT 4800\13\10"
  149. matchstr 5  14 "CONNECT 7200\13\10"
  150. matchstr 6  15 "CONNECT 9600\13\10"
  151. matchstr 7  16 "CONNECT 12000\13\10"
  152. matchstr 8  17 "CONNECT 14400\13\10"
  153. matchstr 9  50 "NO CARRIER\13\10"
  154. matchstr 10  50 "ERROR\13\10"
  155. matchstr 11  52 "NO DIALTONE\13\10"
  156. matchstr 12  53 "BUSY\13\10"
  157. matchstr 13 54 "NO ANSWER\13\10"
  158. matchread 700
  159. jump 31
  160. !
  161. @LABEL 32
  162. userhook 1
  163. note "Answering phone…" 2
  164. jump 31
  165. !
  166. ! 50: error messages
  167. !
  168. @LABEL 50
  169. exit -6021
  170. !
  171. @LABEL 52
  172. exit -6020
  173. !
  174. @LABEL 53
  175. exit -6022
  176. !
  177. @LABEL 54
  178. exit -6023
  179. !
  180. @LABEL 59
  181. exit -6019
  182. !
  183. ! Hang up the modem
  184. !
  185. @HANGUP
  186. @LABEL 60
  187. settries 0
  188. @LABEL 61
  189. matchclr
  190. matchstr 1 63 "OK\13\10"
  191. matchstr 2 63 "NO CARRIER\13\10"
  192. matchstr 3 63 "ERROR\13\10"
  193. write "ATH\13"
  194. matchread 30
  195. inctries
  196. iftries 3 63
  197. ! no response, try escape sequence
  198. matchclr
  199. matchstr 1 62 "OK\13\10"
  200. write "+++"
  201. matchread 20
  202. !
  203. ! No response from modem, toggle DTR
  204. !
  205. DTRClear
  206. pause 5
  207. DTRSet
  208. jump 61
  209. !
  210. @LABEL 62
  211. pause 5
  212. write "ATH0\13"
  213. matchstr 1 63 "OK\13\10"
  214. matchstr 2 63 "NO CARRIER\13\10"
  215. matchstr 3 63 "ERROR\13\10"
  216. matchread 70
  217. jump 61
  218. !
  219. ! Recall factory settings
  220. !
  221. @LABEL 63
  222. pause 5
  223. matchclr
  224. matchstr 1 64 "OK\13\10"
  225. write "AT&F\13"
  226. matchread 30
  227. !
  228. ! Turn off auto answer
  229. !
  230. @LABEL 64
  231. write "ATS0=0\13"
  232. matchstr 1 65 "OK\13\10"
  233. matchread 30
  234. !
  235. !
  236. @LABEL 65
  237. exit 0
  238.